// 钩子函数示例 hooks/index.js

function beforeRegister({
	userRecord,
	clientInfo
} = {}) {
	userRecord.username = '游客' + (Math.random().toString().slice(2, 8)); // 添加用户名+6个数字
	return userRecord // 务必返回处理后的userRecord
}

module.exports = {
	beforeRegister
}